{% extends "form.html" %}
{% load static %}
{% load i18n %}
{% load sitetags %}
{% block form_extend %}
    {% if not ip_error %}
    <a class="btn text-warning" href="{% url 'users:forget' %}">{% trans '忘记密码' %}</a>
    {% if  user_register %}
        <a class="btn btn-success float-right" href="{% url 'users:register' %}">{% trans '注册' %}</a>
    {% endif %}
{#    {% else %}#}
{#        <a class="btn btn-light float-right" onclick="alert('暂不提供注册功能')">{% trans '注册' %}</a>#}
{#    {% endif %}#}


    <div class="clearfix"></div>
{#    <hr>#}
    <div class="third-part">
        <div>
{#            <a class="btn btn-sm p-2" href="{% url 'users:signin' %}{% if next %}?next={{ next }}{% endif %}"><i class="fa fa-share"></i> <i class="fa fa-user"></i> {% trans '中国科技云通行证账号登录' %}</a>#}
        </div>
    </div>
    {% endif %}

    {% if not ip_error %}
        {% get_yunkun_signin_name_url request as yunkun_signin %}
        {% if yunkun_signin %}
            <div class="border-top" style="margin-top: 10px">
                <a class="btn btn-sm p-2" href="{{ yunkun_signin.url }}"><i
                        class="fa fa-share"></i> <i class="fa fa-user"></i> {{ yunkun_signin.name }}</a>
            </div>
        {% endif %}
    {% endif %}
{% endblock %}

{% block script %}
{#    <script type="text/javascript" src="{% static 'passport/passport.js' %}"></script>#}
{#    {% verbatim %}#}
{#    <script>#}
{#        var passport = new Passport({umtUrl:'http://passport.escience.cn'});#}
{#        passport.checkLogin(function(is_login){#}
{#            if(is_login){#}
{#                document.getElementById("id-passport").click();#}
{#            }#}
{#        });#}
{#    </script>#}
{#    {% endverbatim %}#}
{% endblock %}


